exports.updataOne = (dataList, oneData) => {
  const testResultList = [];
  dataList.forEach(function (item, index) {
    testResultList.push(item.asMutable());
  });
  const updateObjIndex = testResultList.findIndex(function (item) {
    return item._id === oneData.data._id;
  });

  testResultList[updateObjIndex].devices = oneData.data.devices;
  testResultList[updateObjIndex].fail = oneData.data.fail;
  testResultList[updateObjIndex].success = oneData.data.success;
  return testResultList;
};
